Xbasic

RTRIM Function

Syntax

Output_String as C = RTRIM(C character[,C other_chars])

Arguments

character

The character string to trim.

other_chars

Optional. Default = " " (space). The characters to trim from the right side of Input_String.

Description

Remove trailing blanks (or optional other characters) from a character string.

Discussion

RTRIM() removes any specified trailing characters in the string. Default value for other_chars is space. However, other_chars can be used to specify a list of characters to trim from the end of the string.

Example

FIRSTNAME + LASTNAME -> "Geoff     Briggs       "
rtrim(FIRSTNAME) + LASTNAME -> "GeoffBriggs       "
rtrim("ALPHA123", "1234567890") ? "ALPHA"

See Also